<!-- 删除提示框 -->
<template>
  <div>
    <!-- persistent 在对话框外点击不关闭对话框 -->
    <q-dialog v-model="isShowDeletes" persistent>
      <q-card style="width: 300px;">
        <q-card-section class="row items-center">
          <q-avatar icon="error_outline" color="primary" text-color="white" />
          <span class="q-ml-sm">{{ tipInfo }}</span>
        </q-card-section>

        <q-card-actions align="right">
          <q-btn unelevated label="取消" type="reset" style="color: #686868;min-width:55px!important;" outline  @click="closeDeleteDialog"/>
          <q-btn outline label="确定" @click="confirmDelete" color="primary" style="min-width:55px!important;"/>
        </q-card-actions>
      </q-card>
    </q-dialog>
  </div>
</template>

<script>
export default {
  props: {
    tipInfo: {
      type: String,
      default: '确定需要删除吗？'
    },
    isShowDelete: {
      type: Boolean,
      default: false
    }
  },
  data () {
    return {
      isShowDeletes: false
    };
  },

  components: {},

  computed: {},
  watch: {
    isShowDelete: {
      immediate: true,
      handler(val) {
        this.isShowDeletes = val
      }
    }
  },

  mounted() {},

  methods: {
    confirmDelete() {
      this.$emit('confirmDelete')
    },
    closeDeleteDialog() {
      this.$emit('closeDeleteDialog')
    }
  }
}

</script>
<style lang='scss' scoped>
</style>
